let _swiper01 = new Swiper('.weifeng-list-box', {
    init: false,
    loop: true,
    direction: 'horizontal',
    slidesPerView: 6,
    centeredSlides: true,
    slideToClickedSlide: true,
    slidesOffsetAfter: 200,// 自动根据容器宽度确定每次滑动的项数
    // grabCursor: true,
})
let str = ''
let str03 = ''
async function getData(url, params, _key) {
    let _res = await request({
        url,
        params,
        headers: { 'X-Request-Id': _key }
    })

    return _res.data
}

// 列表渲染
let _page = 0
async function renderList() {
    let params = {
        page: 1
    }
    let data = await getData('/v1/content/types', params, 'dgmxgkvRVZg+WaDX0YdMU/oXYXy+Q5S8XklkpbgGLr4W4OFImM2iNKvXl29PJ3jZ');

    data.dataList.forEach(ele => {
        str += `
<div class="title-attention title-item swiper-slide" data-id="${ele.id}">
            <span class="attention-text">${ele.name}</span>
        </div>`
    });
    $('.lists-title').append(str)
    _swiper01.init()
}
renderList()